package com.xy.tool.report;

/**
 * Created by zsp on 2018/12/6.
 */
public class Header<TId, TSort> {

    private TId id;
    private String name;
    private TSort sort;

    public TId getId() {
        return id;
    }

    public void setId(TId id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public TSort getSort() {
        return sort;
    }

    public void setSort(TSort sort) {
        this.sort = sort;
    }

    @Override
    public String toString() {
        return "Header{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sort=" + sort +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Header<?, ?> header = (Header<?, ?>) o;

        return id != null ? id.equals(header.id) : header.id == null;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }
}
